﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Business;

namespace BVVD_Website.ql_hoc_tap
{
    public partial class frmDiemdanh : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {

                BVVDDataContext db = new BVVDDataContext();

                var list = (from dd in db.F_CONGHOCs
                            select new
                            {
                                RECID = dd.RECID,
                                MALH = dd.MALH,
                                TENLH = dd.LST_LOPHOC.TENLH,
                                MAMH = dd.MAMH,
                                TENMH = dd.LST_MONHOC.TENMH,
                                MAHV = dd.MAHV,
                                TENHV = dd.LST_HOCVIEN.HODEM + " " + dd.LST_HOCVIEN.TENHV,
                                TRANGTHAI = dd.TRANGTHAI,
                                GHICHU = dd.GHICHU
                            }).ToList();
                grvDiemdanh.DataSource = list;
                grvDiemdanh.DataBind();

            }
        }

        protected void grvDiemdanh_NeedDataSource(object sender, Telerik.Web.UI.GridNeedDataSourceEventArgs e)
        {

            BVVDDataContext db = new BVVDDataContext();
            
        }


    }
}

